{% extends 'base/base.html' %}
{% block cssjs %}
    {% load static %}

    <link rel="stylesheet" href="{% static 'css/home-2.css' %}">
    <link rel="stylesheet" href="{% static 'css/bookpublic.css' %}">
    <link rel="stylesheet" href="{% static 'css/bookindex.css' %}">
    <link rel="stylesheet" href="{% static 'css/nivo-slider.css' %}">
    <link rel="stylesheet" href="{% static 'css/share_style0_16.css' %}">
    <link rel="stylesheet" href="{% static 'css/resource.min.css' %}">


    <script src="{% static 'js/book/handlebars.js' %}" type="text/javascript"></script>
    <script src="{% static 'js/book/public.js' %}" type="text/javascript"></script>
    <script src="{% static 'js/share.js' %}" type="text/javascript"></script>


{% endblock %}
{% block content %}
    <div class="navbox clearfix" style="margin-top: 100px">
                <div class="w">
                    <ul id="J_sideNav" class="sideNav fl">
                        <!-- sideNav start -->
                        <li class="item item0 ">
                            <a href="?type=years" >农业统计年鉴数据</a><s>&gt;</s><b class="icon-cur"></b>
                            <dl class="subnav clearfix">
                                    {% for item in yearlist %}
                                         <dt>
                                        <span class="icon-pic fl"></span>
                                        <a class="itemTxt fl" target="_blank" href="?type=years&select={{ item.year }}">{{ item.year }}年农业统计年鉴</a>

                                    </dt>
                                    {%  endfor %}
                                <dd class="more">
                                    <a href="?type=years"><span class="icon-more"></span>查看全部</a>
                                </dd>
                            </dl>
                        </li>
                        <li class="item item1">
                            <a class="monthdatapublish" href="?type=pest">农业有害生物数据</a><s>&gt;</s><b class="icon-cur"></b>
                            <dl class="subnav clearfix">
                                {% for item in pest %}
                                    <dt>
                                        <span class="icon-pic fl"></span><a class="itemTxt fl" target="_blank" href="?type=pest&select={{ item.id }}">{{ item.title }}</a>
                                    </dt>
                                {% endfor %}

                                <dd class="more">
                                    <input type=hidden id="sid" value="qro0onyudgu1zlhz54q4u4ga">
                                    <a href="?type=pest"><span class="icon-more"></span>查看全部</a>
                                </dd>
                            </dl>
                        </li>
                        <li class="item item2">
                            <a href="{% url 'csvhtml' %}?category=3">作物遗传资源数据</a><s>&gt;</s>
                            <b class="icon-cur"></b>
                            <dl class="subnav clearfix">
                                {% for item in genetic %}
                                    <dt>
                                        <span class="icon-pic fl"></span>
                                        <a class="itemTxt fl" target="_blank" href="{% url 'share' %}?category=3">{{ item.title }}</a>
                                    </dt>
                                {% endfor %}

                                <dd class="more">
                                    <a href="?type=genetic"><span class="icon-more"></span>查看全部</a>
                                </dd>
                            </dl>
                        </li>
                        <li class="item item3">
                            <a href="?type=agritech">农业科技资源数据</a><s>&gt;</s>
                            <b class="icon-cur"></b>
                            <dl class="subnav clearfix">
                                {% for item in agritech %}
                                    <dt>
                                        <span class="icon-pic fl"></span>
                                        <a class="itemTxt fl" target="_blank" href="?type=agritech&select={{ item.id }}">{{ item.title }}</a>
                                    </dt>
                                {% endfor %}
                                <dd class="more">
                                    <a href="?type=agritech"><span class="icon-more"></span>查看全部</a>
                                </dd>
                            </dl>
                        </li>
                        <li class="item item4">
                            <a href="{% url 'share' %}?category=5">作物品种品质数据</a><s>&gt;</s><b class="icon-cur"></b>
                            <dl class="subnav clearfix" style="margin-top: -4px;">
                                {% for item in crop %}
                                    <dt>
                                        <span class="icon-pic fl"></span>
                                        <a class="itemTxt fl" target="_blank" href="{% url 'share' %}?category=5">{{ item.title }}</a>
                                    </dt>
                                {% endfor %}
                                </dt>
                                <dd class="more">
                                    <a href="?type=crop"><span class="icon-more"></span>查看全部</a>
                                </dd>
                            </dl>
                        </li>
                        <li class="item item5">
                            <a href="{% url 'share' %}?category=6">农产品资源数据</a><s>&gt;</s><b class="icon-cur"></b>
                            <dl class="subnav clearfix">
                                 {% for item in product %}
                                    <dt>
                                        <span class="icon-pic fl"></span>
                                        <a class="itemTxt fl" target="_blank" href="{% url 'share' %}?category=6">{{ item.title }}</a>
                                    </dt>
                                {% endfor %}
                                <dd class="more">
                                    <a href="?type=product"><span class="icon-more"></span>查看全部</a>
                                </dd>
                            </dl>
                        </li>
                    </ul><!-- sideNav end -->
                    <div class="bannerbox fl ">
                        <!-- bannerbox start -->
                        <div id="J_nivoSlider" class="nivoSlider">
                            <a class="nivo-imageLink" href="{% url 'resource'  %}?type=years" target="_blank"><img src="/static/img/book/banner-01.jpg" alt=""></a>
                            <a class="nivo-imageLink" href="{% url 'chart'  %}?id=1" target="_blank"><img src="/static/img/book/banner-04.jpg" alt=""></a>
                        </div>
                    </div><!-- bannerbox end -->
                    <ul class="linklist fl">
                        <li class="item0 mr9"><b></b><a href="?type=years" >统计年鉴</a></li>
                        <li class="item1"><b></b><a href="?type=agritech&id=A030201" >科技文献</a></li>
                        <li class="item2 mr9"><b></b><a href="http://www.moa.gov.cn/ztzl/zywhycsl/" >文化遗产</a></li>
                        <li class="item3"><b></b><a href="{% url 'distribute' %}" >物种分布</a></li>
                        <li class="item4 mr9"><b></b><a href="https://public.tableau.com/profile/.1698#!/vizhome/twb_0/sheet1" >统计指标</a></li>
                        <li class="item5"><b></b><a href="http://nc.mofcom.gov.cn/channel/jghq2017/price_list.shtml" >价格行情</a></li>
                    </ul>
                </div>
        </div>
            <!-- navbox end -->
     <div class="container-wrap clearfix" id="particles-js">

            <!--section-group-->
            <div class="section-group pi-section-group clearfix">
                <div class="section-group-inner">

                    <!--section-titlebar-->
                    <div ><h3><p class="cnTit">数据资源</p><span class="enTit">Data Resource</span></h3>
                    </div>
                    <!--/section-titlebar-->
                    <!--section-container-->
                    <div class="section-container">

                        <ul class="pi-list">
                            <li class="pi-list-item">
                                <div class="pi-list-box">
                                    <a href="?type=years"><img alt="农业统计年鉴数据" src="http://cdn.wemorefun.com/content/statics/images/i-pic-1.gif" class="pi-list-img"></a>
                                    <h4 class="pi-list-title">农业统计年鉴数据</h4>
                                    <p class="pi-list-int">反映我国国情国力的基本统计指标，全面、深入展示中国经济最新发展态势。</p>
{#                                    <p class="desnum-l">数据集：<span>187</span></p>#}
{#                                    <p class="desnum-r">浏览量：<span>187</span></p>#}
                                </div>
                            </li>
                            <li class="pi-list-item">
                                <div class="pi-list-box">
                                     <a href="?type=pest"><img alt="农业有害生物数据" src="http://cdn.wemorefun.com/content/statics/images/i-pic-2.gif" class="pi-list-img"></a>
                                    <h4 class="pi-list-title">农业有害生物数据</h4>
                                    <p class="pi-list-int">反映我国国情国力的基本统计指标，全面、深入展示中国经济最新发展态势。</p>
{#                                    <p class="desnum-l">数据集：<span>187</span></p>#}
{#                                    <p class="desnum-r">浏览量：<span>187</span></p>#}
                                </div>
                            </li>
                            <li class="pi-list-item">
                                <div class="pi-list-box">
                                 <a href="{% url 'share' %}?category=4"><img alt="农业科技资源数据" src="http://cdn.wemorefun.com/content/statics/images/i-pic-3.gif" class="pi-list-img"></a>
                                    <h4 class="pi-list-title">农业科技资源数据</h4>
                                    <p class="pi-list-int">反映我国国情国力的基本统计指标，全面、深入展示中国经济最新发展态势。</p>
{#                                    <p class="desnum-l">数据集：<span>187</span></p>#}
{#                                    <p class="desnum-r">浏览量：<span>187</span></p>#}
                                </div>
                            </li>
                        </ul>
                        <ul class="pi-list">
                            <li class="pi-list-item">
                                <div class="pi-list-box">
                                    <a href="{% url 'share' %}?category=3"><img alt="作物遗传资源数据" src="http://cdn.wemorefun.com/content/statics/images/i-pic-1.gif" class="pi-list-img"></a>
                                    <h4 class="pi-list-title">作物遗传资源数据</h4>
                                    <p class="pi-list-int">反映我国国情国力的基本统计指标，全面、深入展示中国经济最新发展态势。</p>
{#                                    <p class="desnum-l">数据集：<span>187</span></p>#}
{#                                    <p class="desnum-r">浏览量：<span>187</span></p>#}
                                </div>
                            </li>
                            <li class="pi-list-item">
                                <div class="pi-list-box">
                                     <a href="{% url 'share' %}?category=5"><img alt="作物品种品质数据" src="http://cdn.wemorefun.com/content/statics/images/i-pic-2.gif" class="pi-list-img"></a>
                                    <h4 class="pi-list-title">作物品种品质数据</h4>
                                    <p class="pi-list-int">反映我国国情国力的基本统计指标，全面、深入展示中国经济最新发展态势。</p>
{#                                    <p class="desnum-l">数据集：<span>187</span></p>#}
{#                                    <p class="desnum-r">浏览量：<span>187</span></p>#}
                                </div>
                            </li>
                            <li class="pi-list-item">
                                <div class="pi-list-box">
                                 <a href="{% url 'share' %}?category=6"><img alt="农产品资源数据" src="http://cdn.wemorefun.com/content/statics/images/i-pic-3.gif" class="pi-list-img"></a>
                                    <h4 class="pi-list-title">农产品资源数据</h4>
                                    <p class="pi-list-int">反映我国国情国力的基本统计指标，全面、深入展示中国经济最新发展态势。</p>
{#                                    <p class="desnum-l">数据集：<span>187</span></p>#}
{#                                    <p class="desnum-r">浏览量：<span>187</span></p>#}
                                </div>
                            </li>
                        </ul>


                    </div>
                    <!--/section-container-->

                </div>
            </div>
            <!--/section-group-->
        </div>

{% endblock %}

{% block foot %}

    <script src="{% static 'js/book/jquery.nivo.slider.pack.js' %}" type="text/javascript"></script>
    <script src="{% static 'js/book/jquery.nstSlider.js' %}" type="text/javascript"></script>
    <script src="{% static 'js/book/ui.js' %}" type="text/javascript"></script>
    <script src="{% static 'js/book/index.js' %}" type="text/javascript"></script>
    <script type="text/javascript">

    $(document).ready(function () {
        SetNavActive();

        // --点击事件:回车
        $("#J_searchTxt").focus(function () {
            $(window).unbind().bind("keydown", function (event) {
                if (event.which == 13 && $("#myForm").valid()) {
                    var keyword = $("#J_searchTxt").val();
                    window.location.href = "/Search/ItemSearch" + "?keyword=" + encodeURIComponent(keyword) + "&f=" + encodeURIComponent("条目检索");
                }
            });
        });
    });

    // --初始化数值检索button的url
    function SetValueSearchHref() {
        if ($("#myForm").valid()) {
            var keyword = $("#J_searchTxt").val();
            $("#ValueSearch").attr("href",  "/Search/ValueSearch"+"?keyword=" + encodeURIComponent(keyword));
        }
    }

    // --初始化条目检索button的url
    function SetItemSearchHref() {
        if ($("#myForm").valid()) {
            var keyword = $("#J_searchTxt").val();
            $("#ItemSearch").attr("href", "/Search/ItemSearch" + "?keyword=" + encodeURIComponent(keyword) + "&f=" + encodeURIComponent("条目检索"));
        }
    }

    // --设置导航选择效果
    function SetNavActive() {
        var url = window.location.href.split('?');
        if (url != null) { url = url[0].toLocaleLowerCase(); };

        if (url.indexOf('/') < 0 || url.indexOf('/') == (url.length - 1)) {
            $("li[module$='home']").addClass('cur').siblings('li').removeClass('cur');
        }
        else if (url.indexOf('/yearbook') > 0) {
            $("li[module$='yearbook']").addClass('cur').siblings('li').removeClass('cur');
        }
        else if (url.indexOf('/seasonormonth') > 0) {
            $("li[module$='monthdata']").addClass('cur').siblings('li').removeClass('cur');
        }
        else if (url.indexOf('/yeardata') > 0) {
            $("li[module$='yeardata']").addClass('cur').siblings('li').removeClass('cur');
        }
        else if (url.indexOf('/sectordata') > 0) {
            $("li[module$='sectordata']").addClass('cur').siblings('li').removeClass('cur');
        }
        else if (url.indexOf('/internationaldata') > 0) {
            $("li[module$='internationaldata']").addClass('cur').siblings('li').removeClass('cur');
        }
        else if (url.indexOf('/decision/methods/') > 0) {
            $("li[module$='decision']").addClass('cur').siblings('li').removeClass('cur');
        }
        else if (url.indexOf('/mydata/mydatafavoriate') > 0) {
            $("li[module$='mydata']").addClass('cur').siblings('li').removeClass('cur');
        }
    }
</script>
{% endblock %}